package saleMarket.service.authority;

import saleMarket.dao.authority.ActorAssRoleDao;
import saleMarket.domain.authority.ActorAssRole;
import util.JdbcHelper;

import java.sql.Connection;
import java.sql.SQLException;

public class ActorAssRoleService {

    private static final ActorAssRoleDao actorAssRoleDao = ActorAssRoleDao.getInstance();
    private static final ActorAssRoleService actorAssRoleService = new ActorAssRoleService();

    public static ActorAssRoleService getInstance() {
        return actorAssRoleService;
    }

    public ActorAssRole find(Integer id) throws SQLException {
        //创建连接对象
        Connection connection = JdbcHelper.getConn();
        ActorAssRole actorAssRole = actorAssRoleDao.find(connection,id);
        //关闭连接
        JdbcHelper.close(connection);
        return actorAssRole;
    }
}
